feat: add Undo/Cut/Copy/Paste keycodes - #5591
Conversation
|
ReenigneArcher
left a comment
There was a problem hiding this comment.
Could you preserve whether the original packet contained the 0x8000 normalized-key prefix before applying this conversion?
SS_KBE_FLAG_NON_NORMALIZED alone does not distinguish these SDL scancodes from F11–F14. Moonlight Android can set that flag when keyboard-layout normalization is unavailable while still sending 0x8000 | VK_*. With the current ordering, 0x807A becomes 0x7A and is then converted from F11 to Undo; F12–F14 similarly become Cut/Copy/Paste.
Please either apply the 0x7A–0x7D aliases only when the original keycode did not contain 0x8000, or remove the ambiguous aliases and accept only the dedicated 0x0100–0x0103 values. A regression test should cover 0x807A–0x807D with SS_KBE_FLAG_NON_NORMALIZED.
When rebasing this PR, please preserve master’s current remapped-key release behavior.



Description
Continuation of #5397 with libvirtualhid.
Add support for Undo/Cut/Copy/Paste keycodes (keyboard HID spec usage IDs 0x7A-0x7D). In order to do this I added some ad-hoc/bespoke keycodes in libvirtualhid.
Depends on LizardByte/libvirtualhid#120
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage
See our AI usage policy.